package com.itheima.chapter07.system;

public class demo {
    public static void main(String[] args) {
//        public static void exit(int status) 终止当前运行的JAVA虚拟机
       /* System.out.println(111);
        System.exit(0);
        System.out.println(222);*/
//        public static long currentTimeMillis() 返回当前时间（以毫秒为单位）
       /* long start = System.currentTimeMillis();//获取当前时间
        for (int i = 0; i < 1000; i++) {
            System.out.println(i);
        }
        long end = System.currentTimeMillis();
        System.out.println(end-start);//58 for循环运行时间*/
//        arraycopy(数据源数组,起始索引,目的地数组,起始索引,拷贝个数) 数组copy
        int[] arr1 ={1,2,3,4,5,6};
        int[] arr2 =new int[11];
        int[] arr3 ={11,12,13,14,15};
        System.arraycopy(arr1,0,arr2,0,arr1.length);
        for (int i = 0; i < arr2.length; i++) {
            System.out.println(arr2[i]);
        }
        System.out.println("----------------");
        System.arraycopy(arr3,3,arr2,9,2);
        for (int i = 0; i < arr2.length; i++) {
            System.out.println(arr2[i]);
        }
    }

 }
